package at.billix.gwt.client;

import com.google.gwt.core.client.*;
import com.google.gwt.user.client.*;
import java.util.*;

/**
 * Entry point classes define <code>onModuleLoad()</code>.
 */
public class PrologTest implements EntryPoint {

  /**
   * This is the entry point method.
   */
  public void onModuleLoad() {
	  Prolog prolog = new Prolog("child(peter, david). child(patricia, david). boy(peter). girl(patricia). son(X, Y) :- child(X, Y), boy(X). daughter(X, Y) :- child(X, Y), girl(X).");
	  Collection result = prolog.eval("son(X, Y)");
	  Window.alert(result != null ? result.toString() : null);
	  result = prolog.eval("daughter(X, Y)");
	  Window.alert(result != null ? result.toString() : null);
  }
  
}

